<div class="upcoming-events-title"><?php echo $this->title; ?></div>
<?php if(count($loans)>0){ ?>
<ul>
<?php foreach($loans as $loan){ ?>
<li><?php echo CHtml::link($loan['customer']->getFullname(),array('customer/view','id'=>$loan['customer']->id));?> 
<?php echo CHtml::link($loan['bank'],array('loan/view','id'=>$loan['id']));?> 
<?php echo $loan['date']; ?> (in <?php echo $loan['daysLeft']; ?> days)
</li>
<?php } ?>
</ul>
<?php }else{ ?>
No events found
<?php } ?>